import request from '../utils/request'

export function fetchAllRoles(){
    return request({
        url:'/api/Role/GetAllRoles',
        method:'get'
    })
}

export function updateRoles(data,paras){
    return request({
        url:'api/Role/UpdateRole',
        data:data,
        params:paras,
        method:'put'
    })
}
export function deleteRole(para){
    return request({
        url:'/api/Role/DeleteRole',
        method:'delete',
        params:para
    })
}

export function addRole(para) {
    return request({
        url:'/api/Role/AddRole',
        method:'post',
        params:para
    })
}

export function fetchRoleByName(para) {
    return request({
        url:'/api/Role/GetRoleByName',
        method:'get',
        params:para
    })
}

